package com.example.japinhands.dao

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update
import com.example.japinhands.data.Word

@Dao
interface WordDao {
    @Insert
    fun insertWord(word: Word): Long

    @Query("select * from word")
    fun getAllWords(): Array<Word>

    @Query("select * from word where id = :wordId")
    fun queryWordById(wordId: Long): Word?

    @Query("delete from word")
    fun deleteWords()

    @Update
    fun updateWord(word: Word)
}